<template>
  <card v-bind="options1">
      <y-table-handler v-bind="handlerOption"></y-table-handler>
      <y-table v-bind="tableOptions"></y-table>
  </card>
</template>

<script>
export default {
  data() {
    return {
      options1: {
        title: "Sample",
        type: "index",
      },
      handlerOption:{
        filter:[
            { type:'input',placeholder:'输入框',bind:[] },
            { type:'select',placeholder:'字典下拉框',bind:[],dict:''},
            { type:'select',placeholder:'数据源下拉框',bind:[],source:''},
            { type:'select-multiple',placeholder:'多选数据源下拉框',bind:[],source:''},
            { type:'date',placeholder:'单日期',bind:[]},
            { type:'date-range',placeholder:'日期范围',bind:[]},
        ],
        operations: [
          { label:'新增' ,icon: "add", function: "add" },
          { label:'编辑' ,icon: "edit", function: "edit" },
          { label:'删除' ,icon: "delete", function: "delete" },
        ],
      },
      tableOptions:{
          columns:[
            { field:'field1',label:'label1',align:'center',fixed:'left',type:'default' },
            { field:'field2',label:'label2',align:'center',fixed:'left',type:'input' },
            { field:'field3',label:'label3',align:'center',fixed:'left',type:'tag' },
            { field:'field4',label:'label4',align:'center',fixed:'left',type:'operation' },
        ]
      }
    };
  },
};
</script>

<style lang="scss" scoped>
</style>